package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.WConInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.crm.jdy.common.pojo.WConInfo;
import com.crm.jdy.common.mapper.WConInfoMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(仓库列表服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class WConInfoServiceImpl  extends ServiceImpl<WConInfoMapper,WConInfo> implements WConInfoService  {

    @Autowired
    WConInfoMapper wConInfoMapper;

    @Override
    public PageInfo<WConInfo> seleteWConInfo(WConInfoDto projectInfoDto) {
        PageHelper.startPage( projectInfoDto.getCurrentPage(),projectInfoDto.getPageSize());
        List<WConInfo> bookList = wConInfoMapper.seleteWConInfo(projectInfoDto);
        PageInfo<WConInfo> pageInfo = new PageInfo<WConInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateWConInfo(WConInfo projectInfo) {
        return wConInfoMapper.updateById(projectInfo) > 0;
    }

    @Override
    public boolean addWConInfo(WConInfo projectInfo) {
        return wConInfoMapper.insert(projectInfo) > 0;
    }

    @Override
    public boolean removeWConInfo(String conId) {
        return wConInfoMapper.deleteById(conId) > 0;
    }
}